package com.grf.hadoop.mul_job;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import java.io.IOException;

public class MulReducer1 extends Reducer<Text, Text, Text, Text> {

    private StringBuffer word;
    private Text v = new Text();

    @Override
    protected void reduce(Text key, Iterable<Text> values, Context context)
            throws IOException, InterruptedException {
        word = new StringBuffer();
        for (Text value : values) {
            word.append(value.toString().replace("\t", "-->") + "\t");
        }
        v.set(word.toString());
        context.write(key, v);
    }
}
